﻿@{
    ViewData["Title"] = "RolesList";
    Layout = "~/Views/_ViewImports.cshtml";
}
<script src="~/js/SystemManager/RolesList.js"></script>

<table id="role" lay-filter="role"></table>

@*头部工具栏*@
<script type="text/html" id="heard_tool">
     <div class="layui-row layui-col-space15">
      <div class="layui-col-md3">
        <input type="text" id="name" name="name" placeholder="角色名" autocomplete="off" class="layui-input">
      </div>
      <div class="layui-col-md3">
        <a class="layui-btn layui-btn-sm power-show" lay-event="search" lay-menu-code="SystemManagerAction:QueryPagesRole" ><i class="layui-icon layui-icon-search" /></a>
        <a class="layui-btn layui-btn-sm power-show" lay-event="add"  lay-menu-code="SystemManagerAction:Insert" ><i class="layui-icon layui-icon-addition" /></a>
        <a class="layui-btn layui-btn-sm power-show" lay-event="batchDel"  lay-menu-code="SystemManagerAction:DeleteByIds" ><i class="layui-icon layui-icon-delete" /></a>
      </div>
    </div>
</script>

@*行工具栏*@
<script type="text/html" id="line_tool">
    <a class="layui-btn layui-btn-xs power-show" lay-event="assign_power" lay-menu-code="SystemManagerAction:UpdatePowerIdsById,SystemManagerAction:QueryRolePowerTreedata" >分配权限</a>
    <a class="layui-btn layui-btn-xs power-show" lay-event="delete" lay-menu-code="SystemManagerAction:DeleteById" ><i class="layui-icon layui-icon-delete" /></a>
</script>

@*添加角色*@
<template id="addrole-template">
    <ul class="layui-form layui-form-pane" style="margin:15px;">
        <li class="layui-form-item">
            <label class="layui-form-label">角色名称：</label>
            <div class="layui-input-inline">
                <input type="text" name="name" required lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
            </div>
        </li>
        <li class="layui-form-item" style="text-align:center">
            <button type="submit" class="layui-btn" lay-submit lay-filter="save">保存</button>
        </li>
    </ul>
</template>

<template id="assign-role-template">
    <div id="powerTree"></div>
</template>